﻿package mortal.game.proxy
{
    import Message.Game.*;
    import Message.Public.*;
    import mortal.game.mvc.*;
    import mortal.mvc.core.*;

    public class CheckInProxy extends Proxy
    {

        public function CheckInProxy()
        {
            return;
        }// end function

        public function getCheckInInfo() : void
        {
            rmi.iCheckIn.getCheckInInfo_async(new AMI_ICheckIn_getCheckInInfo(this.getInfoSucc));
            return;
        }// end function

        private function getInfoSucc(param1:AMI_ICheckIn_getCheckInInfo, param2:SCheckInInfo) : void
        {
            var _loc_3:Object = {};
            _loc_3["state"] = "getInfo";
            _loc_3["data"] = param2;
            NetDispatcher.dispatchCmd(ServerCommand.SignUpGetAllSignUpInfo, _loc_3);
            return;
        }// end function

        public function setCheckIn(param1:int) : void
        {
            rmi.iCheckIn.setCheckIn_async(new AMI_ICheckIn_setCheckIn(this.checkInSucc), param1);
            return;
        }// end function

        private function checkInSucc(param1:AMI_ICheckIn_setCheckIn, param2:SCheckInInfo) : void
        {
            var _loc_3:Object = {};
            _loc_3["state"] = "signUp";
            _loc_3["data"] = param2;
            NetDispatcher.dispatchCmd(ServerCommand.SignUpGetAllSignUpInfo, _loc_3);
            return;
        }// end function

        public function setCheckInAward(param1:int, param2:Boolean) : void
        {
            var _loc_3:Object = {};
            _loc_3.isVip = param2;
            rmi.iCheckIn.setCheckInAward_async(new AMI_ICheckIn_setCheckInAward(this.getAwardSucc, null, _loc_3), param1);
            return;
        }// end function

        private function getAwardSucc(param1:AMI_ICheckIn_setCheckInAward, param2:SCheckInInfo) : void
        {
            var _loc_3:* = param1.userObject.isVip;
            var _loc_4:Object = {};
            _loc_4["state"] = "getReward";
            _loc_4["data"] = param2;
            NetDispatcher.dispatchCmd(ServerCommand.SignUpGetAllSignUpInfo, _loc_4);
            NetDispatcher.dispatchCmd(ServerCommand.SignUpGetRewardSucc, _loc_3);
            return;
        }// end function

    }
}
